// index.js
// const app = getApp()
const { envList } = require('../../envList.js');
Page({
  data: {
    userName: "", 
    num: "", 
    imageSrc: "", 
    title: "",
    content: "",
  },
  // jumpFindDetail(e) {
  //   const pageThis = this
  //   wx.navigateTo({
  //     url: `/pages/ticketDetail/index`,
  //     success(res) {
  //       // 通过eventChannel向被打开页面传送数据
  //       res.eventChannel.emit('sendOutData', { value: pageThis.properties, type: 'scenic' })
  //     }
  //   });
  // },
  // async onReady() {
  //   const { result: { data } } = await wx.cloud.callFunction({
  //     name: 'quickstartFunctions', data: { type: 'getFindList'}
  //   })
  //   this.setData({ list: data })
  //   console.log(data);
  // },
  onReady () {
    const pageThis = this
    this.getOpenerEventChannel().on('sendOutData', (data) => {
      if(data.value) {
        console.log(data.value);
          const { userName, num, imageSrc, title, content, ticket,address,spot, spotContent, recon,detailTitle,roadDes,road,mainDes,mainSpotTilte,mainSpotList,reasonTitle,reasonContent} = data.value
          pageThis.setData({ userName, num, imageSrc, title,content,ticket,address,spot, spotContent, recon,detailTitle,roadDes,road,mainDes,mainSpotTilte,mainSpotList,reasonTitle,reasonContent })
      }
    })
  },
})
